from django.contrib import admin
from django.urls import path, include
from myapp.views import UserListView, PhoneCodeLoginView, PhonePasswordLoginView, SendCode, ThirdPartyLoginUrl, \
    ThirdPartyLoginCallback, QiniuImageUploadTokenView, UploadImage

urlpatterns = [
    path('user/', UserListView.as_view()),
    path('send_code/', SendCode.as_view()),  # 发送验证码
    path('phone_code_login/', PhoneCodeLoginView.as_view()),  # 手机登录
    path('phone_password_login/', PhonePasswordLoginView.as_view()),  # 密码登录
    # path('dingding/', DingdingUrl.as_view()),  # 钉钉登录
    # path('dingding_callback/', DingdingCallback.as_view()),  # 钉钉登录回调
    path('ThirdPartyLoginUrl/<str:platform>/', ThirdPartyLoginUrl.as_view()),
    path('ThirdPartyLoginCallback/<str:platform>/', ThirdPartyLoginCallback.as_view()),
    path('qiniu_image_token/', QiniuImageUploadTokenView.as_view(), name='qiniu-image-token'),
    path('api/upload/', UploadImage.as_view()),
]